﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;

namespace Liang.DataBase.Model.Entity
{
    /// <summary>
    /// 用户
    /// </summary>
    [Serializable]
    public class sys_user : DbBase
    {
        /// <summary>
        /// 主键
        /// </summary>
        public Guid userId { get; set; }

        /// <summary>
        /// 账号
        /// </summary>
        public string loginName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string password { get; set; }

        /// <summary>
        /// 机构id
        /// </summary>
        public Guid organId { get; set; }

        /// <summary>
        /// 一个用户对应一个机构
        /// </summary>
        public virtual sys_organ organ { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string name { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public string sex { get; set; }

        /// <summary>
        /// QQ
        /// </summary>
        public string qq { get; set; }

        /// <summary>
        /// 微信
        /// </summary>
        public string wx { get; set; }

        /// <summary>
        /// 用户拥有的权限
        /// </summary>
        public virtual ISet<sys_role> roles { get; set; }
    }
}
